package cn.fyg.service.finance.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cn.fyg.common.base.retv.Retv;
import cn.fyg.service.finance.domain.accountdetail.AccountdetailService;
import cn.fyg.service.finance.domain.accountdetail.BProjectDto;
import cn.fyg.service.finance.domain.accountdetail.BalanceDto;

@RestController
@RequestMapping("balance")
public class AccountdetailController {
	@Autowired
	AccountdetailService accountdetailService;
	
	@PostMapping(value = "/")
	public Retv<BalanceDto> getAccountAndProjcets(@RequestParam("accountid") String accountid, @RequestParam("accountnumber") String accountnumber) {
		return this.accountdetailService.getAccountAndProjcets(accountid, accountnumber);
	}
	
	@PostMapping(value = "/detail")
	public Retv<BProjectDto> getProjcetDetail(@RequestParam("accountid") String accountid, @RequestParam("projectid") String projectid) {
		return this.accountdetailService.getProjcetDetail(accountid, projectid);
	}
}
